package com.yxp423.ssmempl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yxp423.ssmempl.bean.Process;
import com.yxp423.ssmempl.mapper.ProcessMapper;
import com.yxp423.ssmempl.service.IProcessService;
import com.yxp423.ssmempl.utils.base.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: java类作用描述
 * @Author: yxp
 * @CreateDate: 2019-05-23 14:24
 * @Version: 1.0
 */
@Service
public class ProcessServiceImpl implements IProcessService {

	@Autowired
	ProcessMapper processMapper;

	@Override
	public AjaxResult selectProcess(Process process) {

		AjaxResult result = new AjaxResult();
		QueryWrapper<Process> wrapper = new QueryWrapper<>();
		List<Process> processList = processMapper.selectList(wrapper.eq("project_id", process.getProjectId()));

		result.setSuccess(true);
		result.setData(processList);
		return result;
	}
}
